﻿<UserControl x:Class="CrmAttachmentImage.MainPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d"
    d:DesignHeight="300" d:DesignWidth="400" xmlns:sdk="http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk" xmlns:my="clr-namespace:CrmAttachmentImage">

    <Grid x:Name="LayoutRoot" Background="#f6f8fa" Loaded="LayoutRoot_Loaded">
        <Grid.RowDefinitions>
            <RowDefinition MinHeight="0" MaxHeight="20" />
            <RowDefinition Height="*" />
        </Grid.RowDefinitions>
        <ComboBox Name="ImageSelector" DisplayMemberPath="Key" SelectedValuePath="Value" Background="White" BorderThickness="1" SelectionChanged="ImageSelector_SelectionChanged">
            <ComboBox.BorderBrush>
                <LinearGradientBrush>
                    <GradientStop Color="#FFA3AEB9" Offset="0" />
                    <GradientStop Color="#FF8399A9" Offset="0.375" />
                    <GradientStop Color="#FF718597" Offset="0.375" />
                    <GradientStop Color="Black" Offset="1" />
                </LinearGradientBrush>
            </ComboBox.BorderBrush>
        </ComboBox>
        <Image Grid.Row="1" AllowDrop="True" Margin="5,5,5,5" Name="Image" Source="/CrmAttachmentImage;component/Images/noimage.png" Stretch="None" Drop="ImageDrop" />
        <Rectangle Grid.Row="1" Margin="5,5,5,5" Name="Video" Visibility="Collapsed"/>
        <Image Grid.Row="1" Height="24" Name="UploadButton" Stretch="None" Width="24" Source="/CrmAttachmentImage;component/Images/upload.png" Margin="0,0,10,20" VerticalAlignment="Bottom" HorizontalAlignment="Right" MouseLeftButtonUp="UploadButtonPressed" Cursor="Hand" />
        <Image Grid.Row="1" Height="24" Margin="10,0,0,20" Name="DeleteButton" Source="/CrmAttachmentImage;component/Images/delete.png" Stretch="None" VerticalAlignment="Bottom" HorizontalAlignment="Left" Width="24" MouseLeftButtonUp="DeleteButtonPressed" Cursor="Hand" />
        <TextBlock Grid.Row="1" Name="Message" HorizontalAlignment="Center" FontSize="12" FontFamily="Verdana" Text="Please save the record to attach an image." Foreground="#FF7E0000" FontWeight="Bold" Visibility="Collapsed" VerticalAlignment="Top" TextWrapping="Wrap" FontStretch="Condensed" Margin="0,10,0,0" FontStyle="Italic" />
        <Image Grid.Row="1" Height="24" HorizontalAlignment="Right" Margin="0,0,40,20" Name="WebCamButton" Stretch="None" VerticalAlignment="Bottom" Width="24" Source="/CrmAttachmentImage;component/Images/webcam.png" Cursor="Hand" MouseLeftButtonUp="WebCam_ButtonPressed" Visibility="Collapsed" />
    </Grid>
</UserControl>
